<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/taglibs.jsp" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>巧房宝运营管理后台</title>
<script type="text/javascript" src="${js}/jquery-easyui-1.3.6/jquery.min.js"></script>
<link href="${css}/styles.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
	$(function() {
		$('#username').focus();
	})
	
	function myReset(){
		document.frm.reset();
		$('myusername').html('');
		$('mypassword').html('');
		$('myval').html('');
	}

	function enterLogin(event) {
		if (event.keyCode == 13) {
			login();
		}
	}
	
	function login() {
		var flag = true;
		if(!$.trim($('#username').val())) {
			$('#myusername').html('请输入用户名！');
			flag = false;
		}
		if(!$.trim($('#password').val())) {
			$('#mypassword').html('请输入密码！');
			flag = false;
		}
		if(!$.trim($('#validateCode').val())) {
			$('#myval').html('请输入验证码！');
			flag = false;
		}
		if(flag) {			
			$('#windowHeight').val(document.body.clientHeight);
			$('#windowWidth').val(document.body.clientWidth);
			$('#myform').submit();
		}
	}
	
	function getHW(){
		window.moveTo( 0, 0);//移动窗口
		window.resizeTo(screen.width, screen.height);//改变大小
	}
	
		if (window != top){
			top.location.href = location.href; 
		}  			
</script>
	
	
	
</head>
<body class="loginbg" style="overflow-y:hidden;" onload=getHW()>
	<form method="post" name="frm" id="myform" action="${ctx}/user/auth" onkeydown="enterLogin(event)">
	<table class="box">
		<tr>
			<td>
			<table width="993" height="600" border="0" align="center" cellpadding="0" cellspacing="0">
				<tr>
					<td width="540"><img src="${img}/login_03.gif" width="530" height="181" /></td>
					<td colspan="2"><img src="${img}/login_04.gif" width="463" height="181" />
					
					<input type="hidden" name="windowHeight" id="windowHeight"/>
					<input type="hidden" name="windowWidth" id="windowWidth"/>
					
					</td>
				</tr>
				<tr>
					<td><img src="${img}/login_06.gif" width="530" height="100" /></td>
					<td colspan="2"><img src="${img}/login_07.gif" width="463" height="100" /></td>
				</tr>
				<tr>
					<td valign="top"><img src="${img}/login_08.gif" width="530" height="20" /></td>
					<td width="184" align="left" valign="middle" background="${img}/login_09.gif">
						<input type="text" id="username" name="username" class="input1" />
					</td>
					<td width="279" rowspan="6" valign="top" background="${img}/login_10.gif">
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td id="myusername" height="20" align="left" style="color:#FF0000; padding-left:15px; font-size:12px;"></td>
						</tr>
						<tr>
							<td height="11" align="left"></td>
						</tr>
						<tr>
							<td id="mypassword" height="20" align="left" style="color:#FF0000; padding-left:15px;font-size:12px;"></td>
						</tr>
						<tr>
							<td height="10" align="left"></td>
						</tr>
						<tr>
							<td id="myval" height="20" align="left" style="color:#FF0000; padding-left:15px; font-size:12px;">${message}</td>
						</tr>
					</table>
					</td>
				</tr>
				<tr valign="top">
					<td><img src="${img}/login_11.gif" width="530" height="11" /></td>
					<td align="left"><img src="${img}/login_12.gif" width="184" height="11" /></td>
				</tr>
				<tr valign="top">
					<td><img src="${img}/login_13.gif" width="530" height="20" /></td>
					<td align="left" valign="middle" background="${img}/login_14.gif">
						<input type="password" id="password" name="password" class="input1" />
					</td>
				</tr>
				<tr valign="top">
					<td><img src="${img}/login_15.gif" width="530" height="10" /></td>
					<td align="left"><img src="${img}/login_16.gif" width="184" height="10" /></td>
				</tr>
				<tr valign="top">
					<td height="20"><img src="${img}/login_17.gif" width="530" height="20" /></td>
					<td background="${img}/login_18.gif">
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
						<tr>
					        <td width="44%"><input id="validateCode" type="text" name="validateCode" class="input2" /></td>
					        <td width="56%"><img id='imgVcode' src="${ctx}/image.action" width="60" height="20" onclick="document.getElementById('imgVcode').src = '${ctx}/image.action?'+(new Date()).getTime()" alt="看不清楚 ？点击换一张" /></td>
					      </tr>
					</table>
					</td>
				</tr>
				<tr valign="top">
					<td><img src="${img}/login_19.gif" width="530" height="238" /></td>
					<td background="${img}/login_20.gif">
					<table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-top: 10px;">
						<tr>
							<td width="43%" align="left"><input type="button" onclick="login()" value="登 录" class="anniu" /></td>
		        			<td width="57%" align="left"><input type="button" onclick="myReset()" value="重 填" class="anniu" /></td>
						</tr>
					</table>
					</td>
				</tr>
			</table>
			</td>
		</tr>
	</table>
	</form>
</body>
</html> 